<?php

namespace App\Http\Validate\Salerule;

use App\Http\Validate\BaseValidate;

/**
 * 客户信息验证器
 */
class Salerule extends BaseValidate
{
    //验证规则
    protected $rule = [];
    //自定义验证信息
    protected $message = [];

    public function __construct($doaction = 'add')
    {
        if ($doaction == 'edit') {
            $this->rule = [
                'id' => 'required',
            ];
            $this->message = [
                'id.required' => '规则id不能为空',
            ];
        }
    }
}
